<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <title>错题再现</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="__LIBS__/layui/css/layui.css">
    <link rel="stylesheet" type="text/css" href="__CSS__/doclearn.css" media="all">
    <link rel="shortcut icon" href="{:config('website.icon')}" />
    <link rel="bookmark" href="{:config('website.icon')}" />
</head>
<body>
<div class="layui-layout learn-box">
    <div class="layui-row learn-header">
        <div class="layui-col-md10 learn-title"><a href="{:url('index/exam/error')}">
            <i class="layui-icon layui-icon-left"></i>{$info.title}</a>
        </div>
        <div class="layui-col-md2 layui-layout-right mr50 "><span class="fr"><a href="{:url('index/user/index')}">个人中心</a></span></div>
    </div>
    <div class="layui-row learn-content">
        <div class="learn-playroom">
            {if condition="!empty($myerrors)"}
            <form action="{:url('index/exam/doerrorPost')}" class="layui-form" method="post">
                <input type="hidden"  name="eid" value="{$eid}">
                <input type="hidden"  name="kid" value="{$kid}">
                <div class="layui-row doc-player" style="padding:0px;">
                    <div style="padding: 20px;">
                        <div class="layui-card">
                            <div class="layui-collapse" id="eaxmbox">
                                <div class="layui-colla-item">
                                    <div class="layui-colla-content layui-show pl20">
                                        {if condition="get_question_mark($key) eq 'TiMao'"}

                                        {else /}
                                        {foreach name="myerrors" item="vv" key="k" }
                                        <div id="question_{$vv}" class="mt10">
                                            <div class="question-seq-wrap ">
                                                <div class="question-seq">
                                                    {$k+1}
                                                </div>
                                            </div>
                                            <div class="ml50">
                                                <p style="font-weight: bold; font-size: 15px;">{$vv|get_question_info=###,"question"}</p>
                                            </div>
                                            {switch name=$vv|get_question_info=###,"questiontype"|get_question_mark}
                                            {case value="SingleSelect"}
                                            <div class="mt20 ml50">
                                                {$vv|get_question_info=###,"questionselect"}
                                                {if condition="empty($myexam['myanswer'])"}
                                                <div>
                                                    {$vv|get_SingleSelect}
                                                </div>
                                                {else /}
                                                <div class="layui-row mt10">
                                                    <div class="layui-col-md10">
                                                        正确答案是：{$vv|get_answer} &nbsp; &nbsp;
                                                        你的答案是：{$myexam['myanswer'][$vv]}&nbsp; &nbsp;&nbsp; &nbsp;
                                                    </div>
                                                    <div class="layui-col-md2">
                                                        <span class="js-analysis">
                                                            <a style="cursor:pointer;" class="zhankai zhankai{$vv}" aid="{$vv}"><i class="layui-icon layui-icon-down mr10"></i>展开解析</a>
                                                            <a style="cursor:pointer;" class="shouqi shouqi{$vv} layui-hide" aid="{$vv}"><i class="layui-icon layui-icon-up mr10"></i>收起解析</a>
                                                        </span>
                                                    </div>
                                                </div>
                                                <div class="analysis{$vv} well mb0 mt20 layui-hide">
                                                    <p>{$vv|get_analysis}</p>
                                                </div>
                                                {/if}
                                            </div>
                                            {/case}
                                            {case value="MultiSelect"}
                                            <div class="mt20 ml50">
                                                {$vv|get_question_info=###,"questionselect"}
                                                {if condition="empty($myexam['myanswer'])"}
                                                <div>
                                                    {$vv|get_multiSelect}
                                                </div>
                                                {else /}
                                                <div class="layui-row mt10">
                                                    <div class="layui-col-md10">
                                                        正确答案是：{$vv|get_answer} &nbsp; &nbsp;
                                                        你的答案是：{$myexam['myanswer'][$vv]}&nbsp; &nbsp;&nbsp; &nbsp;
                                                    </div>
                                                    <div class="layui-col-md2">
                                                        <span class="js-analysis">
                                                            <a style="cursor:pointer;" class="zhankai zhankai{$vv}" aid="{$vv}"><i class="layui-icon layui-icon-down mr10"></i>展开解析</a>
                                                            <a style="cursor:pointer;" class="shouqi shouqi{$vv} layui-hide" aid="{$vv}"><i class="layui-icon layui-icon-up mr10"></i>收起解析</a>
                                                        </span>
                                                    </div>
                                                </div>
                                                <div class="analysis{$vv} well mb0 mt20 layui-hide">
                                                    <p>{$vv|get_analysis}</p>
                                                </div>
                                                {/if}
                                            </div>
                                            {/case}
                                            {case value="FillInBlanks"}
                                            <div class="mt20 ml50">
                                                {if condition="empty($myexam['myanswer'])"}
                                                <block id="editor{$vv}"></block>
                                                <textarea name="answer[{$vv}]" style="display: none"  id="answereditor{$vv}"></textarea>
                                                {else /}
                                                <div class="layui-row mt10">
                                                    <div class="layui-col-md10">
                                                        <div class="layui-col-md12">
                                                            正确答案是：{$vv|get_answer}
                                                        </div>
                                                        <div class="layui-col-md12">
                                                            你的答案是：{$myexam['myanswer'][$vv]}
                                                        </div>
                                                    </div>
                                                    <div class="layui-col-md2">
                                                        <span class="js-analysis">
                                                            <a style="cursor:pointer;" class="zhankai zhankai{$vv}" aid="{$vv}"><i class="layui-icon layui-icon-down mr10"></i>展开解析</a>
                                                            <a style="cursor:pointer;" class="shouqi shouqi{$vv} layui-hide" aid="{$vv}"><i class="layui-icon layui-icon-up mr10"></i>收起解析</a>
                                                        </span>
                                                    </div>
                                                </div>
                                                <div class="analysis{$vv} well mb0 mt20 layui-hide">
                                                    <p>{$vv|get_analysis}</p>
                                                </div>
                                                {/if}
                                            </div>
                                            {/case}
                                            {case value="TrueOrfalse"}
                                            <div class="mt20 ml50">
                                                {if condition="empty($myexam['myanswer'])"}
                                                <div class="mt10">
                                                    <input type="radio" name="answer[{$vv}]" value="1" title="正确">
                                                    <input type="radio" name="answer[{$vv}]" value="0" title="错误">
                                                </div>
                                                {else /}
                                                <div class="layui-row mt10">
                                                    <div class="layui-col-md10">
                                                        正确答案是：{$vv|get_answer|get_yesOrNo}&nbsp; &nbsp;
                                                        你的答案是：{$myexam['myanswer'][$vv]|get_yesOrNo}&nbsp; &nbsp;&nbsp; &nbsp;
                                                    </div>
                                                    <div class="layui-col-md2">
                                                        <span class="js-analysis">
                                                            <a style="cursor:pointer;" class="zhankai zhankai{$vv}" aid="{$vv}"><i class="layui-icon layui-icon-down mr10"></i>展开解析</a>
                                                            <a style="cursor:pointer;" class="shouqi shouqi{$vv} layui-hide" aid="{$vv}"><i class="layui-icon layui-icon-up mr10"></i>收起解析</a>
                                                        </span>
                                                    </div>
                                                </div>
                                                <div class="analysis{$vv} well mb0 mt20 layui-hide">
                                                    <p>{$vv|get_analysis}</p>
                                                </div>
                                                {/if}
                                            </div>
                                            {/case}
                                            {case value="ShortAnswer"}
                                            <div class="mt20 ml50">
                                                {if condition="empty($myexam['myanswer'])"}
                                                <block id="editor{$vv}"></block>
                                                <textarea  name="answer[{$vv}]"  style="display: none" id="answereditor{$vv}"></textarea>
                                                {else /}
                                                <div class="layui-row mt10">
                                                    <div class="layui-col-md10">
                                                        <div class="layui-col-md12">
                                                            正确答案是：{$vv|get_answer}
                                                        </div>
                                                        <div class="layui-col-md12">
                                                            你的答案是：{$myexam['myanswer'][$vv]}
                                                        </div>
                                                    </div>
                                                    <div class="layui-col-md2">
                                                        <span class="js-analysis">
                                                            <a style="cursor:pointer;" class="zhankai zhankai{$vv}" aid="{$vv}"><i class="layui-icon layui-icon-down mr10"></i>展开解析</a>
                                                            <a style="cursor:pointer;" class="shouqi shouqi{$vv} layui-hide" aid="{$vv}"><i class="layui-icon layui-icon-up mr10"></i>收起解析</a>
                                                        </span>
                                                    </div>
                                                </div>
                                                <div class="analysis{$vv} well mb0 mt20 layui-hide">
                                                    <p>{$vv|get_analysis}</p>
                                                </div>
                                                {/if}
                                            </div>
                                            {/case}
                                            {/switch}
                                        </div>
                                        <hr class="mb20">
                                        {/foreach}
                                        {/if}
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                {if condition="empty($myexam['myanswer'])"}
                <div class="layui-row  learn-bottom">
                    <button id="jiaojuan" class="layui-btn layui-btn-normal" lay-filter="*" lay-submit="">提交</button>
                </div>
                {/if}
            </form>
            {else /}
            <div class="nodata text-center"><img src="/static/default/img/nodata.png"><br>暂无内容，敬请期待</div>
            {/if}
        </div>
        <div class="learn-right-box">
            <a href="javascript:void(0);" id="aside-slide" class="btn-slide l am-show-lg-up"><i>〉</i></a>
            <div class="learn-r-wrap">
                <div  class="time"></div>
                <div  class="answer-view">
                    <div  class="nums">
                        {if condition="get_question_mark($key) eq 'TiMao'"}

                        {else /}
                        {foreach name="myerrors" item="vv" key="k"}
                        {php}
                            if($myexam['myresult'][$vv]==1){
                                $result='done';
                            }
                            if($myexam['myresult'][$vv]==2){
                                $result='error';
                            }
                        {/php}
                        <a href="javascript:void(0)"  class="num {$result}" signid="{$vv}" id="signeditor{$vv}">{$k+1}</a>
                        {/foreach}<br>
                        {/if}
                    </div>
                    <div  class="legend" id="legend">
                        <span  class="num done"></span>
                        <span >已做</span>
                        <span  class="num error"></span>
                        <span >错误</span>
                        <span  class="num"></span>
                        <span >未做</span>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
<script src="__LIBS__/layui/layui.all.js"></script>
<script src="__COMMON__/common.js"></script>
<script src="https://cdn.bootcss.com/stickyNavbar.js/1.3.5/jquery.stickyNavbar.min.js"></script>
<script src="//unpkg.com/wangeditor/release/wangEditor.min.js"></script>
<script>
    var E = window.wangEditor;
    $("#eaxmbox block").each(function () {
        var id=this.id;
        var editor = new E('#'+id);
        editor.customConfig.onchange = function (html) {
            $('#answer'+id).val(html);
            $("#sign"+id).addClass("done");
        };
        editor.customConfig.uploadFileName = 'image';
        editor.customConfig.uploadImgServer = '/api/Uploader/wangEditorUp';
        editor.create();
        $('#answer'+id).val(editor.txt.html());
    })
</script>
</html>